package com.modern.js.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.modern.js.entity.Contact;
import com.modern.js.mapper.ContactMapper;
import com.modern.js.pojo.ContactPojo;
import com.modern.js.service.IContactService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author PIGS
 * @since 2020-03-28
 */
@Service
@Transactional
public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> implements IContactService {
    @Autowired
    private ContactMapper contactMapper;
    @Override
    public IPage<ContactPojo> selectAll(Page<ContactPojo> page) {
        return contactMapper.selectAll(page);
    }

    @Override
    public IPage<ContactPojo> selectById(Page<ContactPojo> page, Integer empId) {
        return contactMapper.selectById(page,empId);
    }
}
